// 楼栋数据
(function() {
	let left2_L = document.querySelector('.left_L');
	let dateList = [{
			name: '1号楼',
			value: 0.98
		},
		{
			name: '2号楼',
			value: 0.98
		},
		{
			name: '3号楼',
			value: 0.98
		}
	];
	const inn = dateList
		.map((v) => {
			return `<div><p>${v.name}</p><p><e></e>园区入住率:<span>${toFixedVal(
        v.value
      )}</span>%</p> </div>`;
		})
		.forEach((v) => {
			left2_L.innerHTML += v;
		});

	function toFixedVal(val) {
		return (val * 100).toFixed(2);
	}
})();

// 园区运营可视化

;
(function() {
	let myChart = echarts.init(document.querySelector('.left_bottom .center'));
	let option = {
		color: ['#00A0E5', '#FF632F', '#85FF00', '#B322C5'],
		tooltip: {
			trigger: 'item',
			formatter: '{a} <br/>{b}: {c} ({d}%)'
		},
		legend: {
			orient: 'vertical',
			data: [
				'服务：工商、财税、行政',
				'人才：招聘、活动',
				'创新：创业、金融',
				'党建：活动 政策：活动'
			],
			left: 'center',
			bottom: 40,
			icon: 'rect',
			itemWidth: 16,
			itemHeight: 16,
			padding: 0,
			itemGap: 16,
			textStyle: {
				color: '#fff',
				fontSize: 14
			}
		},
		series: [{
			name: '园区运营',
			type: 'pie',
			radius: ['30%', '50%'],
			center: ['50%', '30%'],
			avoidLabelOverlap: false,
			label: {
				show: false,
				position: 'center'
			},
			emphasis: {
				label: {
					show: true,
					fontSize: '18',
					fontWeight: 'bold'
				}
			},
			labelLine: {
				show: false
			},
			data: [{
					value: 335,
					name: '服务：工商、财税、行政'
				},
				{
					value: 310,
					name: '人才：招聘、活动'
				},
				{
					value: 234,
					name: '创新：创业、金融'
				},
				{
					value: 135,
					name: '党建：活动 政策：活动'
				}
			]
		}]
	};
	myChart.setOption(option);
	window.addEventListener('resize', () => {
		myChart.resize();
	});
})();









// ;
// (function () {
//   let myChart = echarts.init(document.querySelector(' '));
//   let option = {};
//   myChart.setOption(option);
//   window.addEventListener('resize', () => {
//     myChart.resize();
//   });
// })();
